﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SmartConference.Infrastructure.Migrations
{
    public partial class 会议时间 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "MeetingTime",
                table: "MeetingReservation",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "datetime2");

            migrationBuilder.AddColumn<string>(
                name: "BeginTime",
                table: "MeetingReservation",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "EndTime",
                table: "MeetingReservation",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.UpdateData(
                table: "UserInfo",
                keyColumn: "IDNumber",
                keyValue: 1L,
                column: "Birthday",
                value: new DateTime(2025, 6, 2, 21, 57, 8, 308, DateTimeKind.Local).AddTicks(7040));
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "BeginTime",
                table: "MeetingReservation");

            migrationBuilder.DropColumn(
                name: "EndTime",
                table: "MeetingReservation");

            migrationBuilder.AlterColumn<DateTime>(
                name: "MeetingTime",
                table: "MeetingReservation",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
                oldClrType: typeof(string),
                oldType: "nvarchar(max)",
                oldNullable: true);

            migrationBuilder.UpdateData(
                table: "UserInfo",
                keyColumn: "IDNumber",
                keyValue: 1L,
                column: "Birthday",
                value: new DateTime(2025, 6, 2, 21, 53, 49, 279, DateTimeKind.Local).AddTicks(2428));
        }
    }
}
